home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-27 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  40.2 KB  |  947 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: Instruction Output,  Next: Dispatch Tables,  Prev: Macros for Initialization,  Up: Assembler Format
  36.  
  37. Output of Assembler Instructions
  38. --------------------------------
  39.  
  40.    This describes assembler instruction output.
  41.  
  42. `REGISTER_NAMES'
  43.      A C initializer containing the assembler's names for the machine
  44.      registers, each one as a C string constant.  This is what
  45.      translates register numbers in the compiler into assembler
  46.      language.
  47.  
  48. `ADDITIONAL_REGISTER_NAMES'
  49.      If defined, a C initializer for an array of structures containing
  50.      a name and a register number.  This macro defines additional names
  51.      for hard registers, thus allowing the `asm' option in declarations
  52.      to refer to registers using alternate names.
  53.  
  54. `ASM_OUTPUT_OPCODE (STREAM, PTR)'
  55.      Define this macro if you are using an unusual assembler that
  56.      requires different names for the machine instructions.
  57.  
  58.      The definition is a C statement or statements which output an
  59.      assembler instruction opcode to the stdio stream STREAM.  The
  60.      macro-operand PTR is a variable of type `char *' which points to
  61.      the opcode name in its "internal" form--the form that is written
  62.      in the machine description.  The definition should output the
  63.      opcode name to STREAM, performing any translation you desire, and
  64.      increment the variable PTR to point at the end of the opcode so
  65.      that it will not be output twice.
  66.  
  67.      In fact, your macro definition may process less than the entire
  68.      opcode name, or more than the opcode name; but if you want to
  69.      process text that includes `%'-sequences to substitute operands,
  70.      you must take care of the substitution yourself.  Just be sure to
  71.      increment PTR over whatever text should not be output normally.
  72.  
  73.      If you need to look at the operand values, they can be found as the
  74.      elements of `recog_operand'.
  75.  
  76.      If the macro definition does nothing, the instruction is output in
  77.      the usual way.
  78.  
  79. `FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)'
  80.      If defined, a C statement to be executed just prior to the output
  81.      of assembler code for INSN, to modify the extracted operands so
  82.      they will be output differently.
  83.  
  84.      Here the argument OPVEC is the vector containing the operands
  85.      extracted from INSN, and NOPERANDS is the number of elements of
  86.      the vector which contain meaningful data for this insn.  The
  87.      contents of this vector are what will be used to convert the insn
  88.      template into assembler code, so you can change the assembler
  89.      output by changing the contents of the vector.
  90.  
  91.      This macro is useful when various assembler syntaxes share a single
  92.      file of instruction patterns; by defining this macro differently,
  93.      you can cause a large class of instructions to be output
  94.      differently (such as with rearranged operands).  Naturally,
  95.      variations in assembler syntax affecting individual insn patterns
  96.      ought to be handled by writing conditional output routines in
  97.      those patterns.
  98.  
  99.      If this macro is not defined, it is equivalent to a null statement.
  100.  
  101. `FINAL_PRESCAN_LABEL'
  102.      If defined, `FINAL_PRESCAN_INSN' will be called on each
  103.      `CODE_LABEL'.  In that case, OPVEC will be a null pointer and
  104.      NOPERANDS will be zero.
  105.  
  106. `PRINT_OPERAND (STREAM, X, CODE)'
  107.      A C compound statement to output to stdio stream STREAM the
  108.      assembler syntax for an instruction operand X.  X is an RTL
  109.      expression.
  110.  
  111.      CODE is a value that can be used to specify one of several ways of
  112.      printing the operand.  It is used when identical operands must be
  113.      printed differently depending on the context.  CODE comes from the
  114.      `%' specification that was used to request printing of the
  115.      operand.  If the specification was just `%DIGIT' then CODE is 0;
  116.      if the specification was `%LTR DIGIT' then CODE is the ASCII code
  117.      for LTR.
  118.  
  119.      If X is a register, this macro should print the register's name.
  120.      The names can be found in an array `reg_names' whose type is `char
  121.      *[]'.  `reg_names' is initialized from `REGISTER_NAMES'.
  122.  
  123.      When the machine description has a specification `%PUNCT' (a `%'
  124.      followed by a punctuation character), this macro is called with a
  125.      null pointer for X and the punctuation character for CODE.
  126.  
  127. `PRINT_OPERAND_PUNCT_VALID_P (CODE)'
  128.      A C expression which evaluates to true if CODE is a valid
  129.      punctuation character for use in the `PRINT_OPERAND' macro.  If
  130.      `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no
  131.      punctuation characters (except for the standard one, `%') are used
  132.      in this way.
  133.  
  134. `PRINT_OPERAND_ADDRESS (STREAM, X)'
  135.      A C compound statement to output to stdio stream STREAM the
  136.      assembler syntax for an instruction operand that is a memory
  137.      reference whose address is X.  X is an RTL expression.
  138.  
  139.      On some machines, the syntax for a symbolic address depends on the
  140.      section that the address refers to.  On these machines, define the
  141.      macro `ENCODE_SECTION_INFO' to store the information into the
  142.      `symbol_ref', and then check for it here.  *Note Assembler
  143.      Format::.
  144.  
  145. `DBR_OUTPUT_SEQEND(FILE)'
  146.      A C statement, to be executed after all slot-filler instructions
  147.      have been output.  If necessary, call `dbr_sequence_length' to
  148.      determine the number of slots filled in a sequence (zero if not
  149.      currently outputting a sequence), to decide how many no-ops to
  150.      output, or whatever.
  151.  
  152.      Don't define this macro if it has nothing to do, but it is helpful
  153.      in reading assembly output if the extent of the delay sequence is
  154.      made explicit (e.g. with white space).
  155.  
  156.      Note that output routines for instructions with delay slots must be
  157.      prepared to deal with not being output as part of a sequence (i.e.
  158.      when the scheduling pass is not run, or when no slot fillers could
  159.      be found.)  The variable `final_sequence' is null when not
  160.      processing a sequence, otherwise it contains the `sequence' rtx
  161.      being output.
  162.  
  163. `REGISTER_PREFIX'
  164. `LOCAL_LABEL_PREFIX'
  165. `USER_LABEL_PREFIX'
  166. `IMMEDIATE_PREFIX'
  167.      If defined, C string expressions to be used for the `%R', `%L',
  168.      `%U', and `%I' options of `asm_fprintf' (see `final.c').  These
  169.      are useful when a single `md' file must support multiple assembler
  170.      formats.  In that case, the various `tm.h' files can define these
  171.      macros differently.
  172.  
  173. `ASSEMBLER_DIALECT'
  174.      If your target supports multiple dialects of assembler language
  175.      (such as different opcodes), define this macro as a C expression
  176.      that gives the numeric index of the assembler language dialect to
  177.      use, with zero as the first variant.
  178.  
  179.      If this macro is defined, you may use constructs of the form
  180.      `{option0|option1|option2...}' in the output templates of patterns
  181.      (*note Output Template::.) or in the first argument of
  182.      `asm_fprintf'.  This construct outputs `option0', `option1' or
  183.      `option2', etc., if the value of `ASSEMBLER_DIALECT' is zero, one
  184.      or two, etc.  Any special characters within these strings retain
  185.      their usual meaning.
  186.  
  187.      If you do not define this macro, the characters `{', `|' and `}'
  188.      do not have any special meaning when used in templates or operands
  189.      to `asm_fprintf'.
  190.  
  191.      Define the macros `REGISTER_PREFIX', `LOCAL_LABEL_PREFIX',
  192.      `USER_LABEL_PREFIX' and `IMMEDIATE_PREFIX' if you can express the
  193.      variations in assembler language syntax with that mechanism.
  194.      Define `ASSEMBLER_DIALECT' and use the `{option0|option1}' syntax
  195.      if the syntax variant are larger and involve such things as
  196.      different opcodes or operand order.
  197.  
  198. `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)'
  199.      A C expression to output to STREAM some assembler code which will
  200.      push hard register number REGNO onto the stack.  The code need not
  201.      be optimal, since this macro is used only when profiling.
  202.  
  203. `ASM_OUTPUT_REG_POP (STREAM, REGNO)'
  204.      A C expression to output to STREAM some assembler code which will
  205.      pop hard register number REGNO off of the stack.  The code need
  206.      not be optimal, since this macro is used only when profiling.
  207.  
  208. 
  209. File: gcc.info,  Node: Dispatch Tables,  Next: Exception Region Output,  Prev: Instruction Output,  Up: Assembler Format
  210.  
  211. Output of Dispatch Tables
  212. -------------------------
  213.  
  214.    This concerns dispatch tables.
  215.  
  216. `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, BODY, VALUE, REL)'
  217.      A C statement to output to the stdio stream STREAM an assembler
  218.      pseudo-instruction to generate a difference between two labels.
  219.      VALUE and REL are the numbers of two internal labels.  The
  220.      definitions of these labels are output using
  221.      `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the same
  222.      way here.  For example,
  223.  
  224.           fprintf (STREAM, "\t.word L%d-L%d\n",
  225.                    VALUE, REL)
  226.  
  227.      You must provide this macro on machines where the addresses in a
  228.      dispatch table are relative to the table's own address.  If
  229.      defined, GNU CC will also use this macro on all machines when
  230.      producing PIC.  BODY is the body of the ADDR_DIFF_VEC; it is
  231.      provided so that the mode and flags can be read.
  232.  
  233. `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)'
  234.      This macro should be provided on machines where the addresses in a
  235.      dispatch table are absolute.
  236.  
  237.      The definition should be a C statement to output to the stdio
  238.      stream STREAM an assembler pseudo-instruction to generate a
  239.      reference to a label.  VALUE is the number of an internal label
  240.      whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'.  For
  241.      example,
  242.  
  243.           fprintf (STREAM, "\t.word L%d\n", VALUE)
  244.  
  245. `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)'
  246.      Define this if the label before a jump-table needs to be output
  247.      specially.  The first three arguments are the same as for
  248.      `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table
  249.      which follows (a `jump_insn' containing an `addr_vec' or
  250.      `addr_diff_vec').
  251.  
  252.      This feature is used on system V to output a `swbeg' statement for
  253.      the table.
  254.  
  255.      If this macro is not defined, these labels are output with
  256.      `ASM_OUTPUT_INTERNAL_LABEL'.
  257.  
  258. `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)'
  259.      Define this if something special must be output at the end of a
  260.      jump-table.  The definition should be a C statement to be executed
  261.      after the assembler code for the table is written.  It should write
  262.      the appropriate code to stdio stream STREAM.  The argument TABLE
  263.      is the jump-table insn, and NUM is the label-number of the
  264.      preceding label.
  265.  
  266.      If this macro is not defined, nothing special is output at the end
  267.      of the jump-table.
  268.  
  269. 
  270. File: gcc.info,  Node: Exception Region Output,  Next: Alignment Output,  Prev: Dispatch Tables,  Up: Assembler Format
  271.  
  272. Assembler Commands for Exception Regions
  273. ----------------------------------------
  274.  
  275.    This describes commands marking the start and the end of an exception
  276. region.
  277.  
  278. `ASM_OUTPUT_EH_REGION_BEG ()'
  279.      A C expression to output text to mark the start of an exception
  280.      region.
  281.  
  282.      This macro need not be defined on most platforms.
  283.  
  284. `ASM_OUTPUT_EH_REGION_END ()'
  285.      A C expression to output text to mark the end of an exception
  286.      region.
  287.  
  288.      This macro need not be defined on most platforms.
  289.  
  290. `EXCEPTION_SECTION ()'
  291.      A C expression to switch to the section in which the main
  292.      exception table is to be placed (*note Sections::.).  The default
  293.      is a section named `.gcc_except_table' on machines that support
  294.      named sections via `ASM_OUTPUT_SECTION_NAME', otherwise if `-fpic'
  295.      or `-fPIC' is in effect, the `data_section', otherwise the
  296.      `readonly_data_section'.
  297.  
  298. `EH_FRAME_SECTION_ASM_OP'
  299.      If defined, a C string constant for the assembler operation to
  300.      switch to the section for exception handling frame unwind
  301.      information.  If not defined, GNU CC will provide a default
  302.      definition if the target supports named sections.  `crtstuff.c'
  303.      uses this macro to switch to the appropriate section.
  304.  
  305.      You should define this symbol if your target supports DWARF 2 frame
  306.      unwind information and the default definition does not work.
  307.  
  308. `OMIT_EH_TABLE ()'
  309.      A C expression that is nonzero if the normal exception table output
  310.      should be omitted.
  311.  
  312.      This macro need not be defined on most platforms.
  313.  
  314. `EH_TABLE_LOOKUP ()'
  315.      Alternate runtime support for looking up an exception at runtime
  316.      and finding the associated handler, if the default method won't
  317.      work.
  318.  
  319.      This macro need not be defined on most platforms.
  320.  
  321. `DOESNT_NEED_UNWINDER'
  322.      A C expression that decides whether or not the current function
  323.      needs to have a function unwinder generated for it.  See the file
  324.      `except.c' for details on when to define this, and how.
  325.  
  326. `MASK_RETURN_ADDR'
  327.      An rtx used to mask the return address found via RETURN_ADDR_RTX,
  328.      so that it does not contain any extraneous set bits in it.
  329.  
  330. `DWARF2_UNWIND_INFO'
  331.      Define this macro to 0 if your target supports DWARF 2 frame unwind
  332.      information, but it does not yet work with exception handling.
  333.      Otherwise, if your target supports this information (if it defines
  334.      `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or
  335.      `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1.
  336.  
  337.      If this macro is defined to 1, the DWARF 2 unwinder will be the
  338.      default exception handling mechanism; otherwise, setjmp/longjmp
  339.      will be used by default.
  340.  
  341.      If this macro is defined to anything, the DWARF 2 unwinder will be
  342.      used instead of inline unwinders and __unwind_function in the
  343.      non-setjmp case.
  344.  
  345. 
  346. File: gcc.info,  Node: Alignment Output,  Prev: Exception Region Output,  Up: Assembler Format
  347.  
  348. Assembler Commands for Alignment
  349. --------------------------------
  350.  
  351.    This describes commands for alignment.
  352.  
  353. `LABEL_ALIGN_AFTER_BARRIER (LABEL)'
  354.      The alignment (log base 2) to put in front of LABEL, which follows
  355.      a BARRIER.
  356.  
  357.      This macro need not be defined if you don't want any special
  358.      alignment to be done at such a time.  Most machine descriptions do
  359.      not currently define the macro.
  360.  
  361. `LOOP_ALIGN (LABEL)'
  362.      The alignment (log base 2) to put in front of LABEL, which follows
  363.      a NOTE_INSN_LOOP_BEG note.
  364.  
  365.      This macro need not be defined if you don't want any special
  366.      alignment to be done at such a time.  Most machine descriptions do
  367.      not currently define the macro.
  368.  
  369. `LABEL_ALIGN (LABEL)'
  370.      The alignment (log base 2) to put in front of LABEL.  If
  371.      LABEL_ALIGN_AFTER_BARRIER / LOOP_ALIGN specify a different
  372.      alignment, the maximum of the specified values is used.
  373.  
  374. `ASM_OUTPUT_SKIP (STREAM, NBYTES)'
  375.      A C statement to output to the stdio stream STREAM an assembler
  376.      instruction to advance the location counter by NBYTES bytes.
  377.      Those bytes should be zero when loaded.  NBYTES will be a C
  378.      expression of type `int'.
  379.  
  380. `ASM_NO_SKIP_IN_TEXT'
  381.      Define this macro if `ASM_OUTPUT_SKIP' should not be used in the
  382.      text section because it fails to put zeros in the bytes that are
  383.      skipped.  This is true on many Unix systems, where the pseudo-op
  384.      to skip bytes produces no-op instructions rather than zeros when
  385.      used in the text section.
  386.  
  387. `ASM_OUTPUT_ALIGN (STREAM, POWER)'
  388.      A C statement to output to the stdio stream STREAM an assembler
  389.      command to advance the location counter to a multiple of 2 to the
  390.      POWER bytes.  POWER will be a C expression of type `int'.
  391.  
  392. `ASM_OUTPUT_MAX_SKIP_ALIGN (STREAM, POWER, MAX_SKIP)'
  393.      A C statement to output to the stdio stream STREAM an assembler
  394.      command to advance the location counter to a multiple of 2 to the
  395.      POWER bytes, but only if MAX_SKIP or fewer bytes are needed to
  396.      satisfy the alignment request.  POWER and MAX_SKIP will be a C
  397.      expression of type `int'.
  398.  
  399. 
  400. File: gcc.info,  Node: Debugging Info,  Next: Cross-compilation,  Prev: Assembler Format,  Up: Target Macros
  401.  
  402. Controlling Debugging Information Format
  403. ========================================
  404.  
  405.    This describes how to specify debugging information.
  406.  
  407. * Menu:
  408.  
  409. * All Debuggers::      Macros that affect all debugging formats uniformly.
  410. * DBX Options::        Macros enabling specific options in DBX format.
  411. * DBX Hooks::          Hook macros for varying DBX format.
  412. * File Names and DBX:: Macros controlling output of file names in DBX format.
  413. * SDB and DWARF::      Macros for SDB (COFF) and DWARF formats.
  414.  
  415. 
  416. File: gcc.info,  Node: All Debuggers,  Next: DBX Options,  Up: Debugging Info
  417.  
  418. Macros Affecting All Debugging Formats
  419. --------------------------------------
  420.  
  421.    These macros affect all debugging formats.
  422.  
  423. `DBX_REGISTER_NUMBER (REGNO)'
  424.      A C expression that returns the DBX register number for the
  425.      compiler register number REGNO.  In simple cases, the value of this
  426.      expression may be REGNO itself.  But sometimes there are some
  427.      registers that the compiler knows about and DBX does not, or vice
  428.      versa.  In such cases, some register may need to have one number in
  429.      the compiler and another for DBX.
  430.  
  431.      If two registers have consecutive numbers inside GNU CC, and they
  432.      can be used as a pair to hold a multiword value, then they *must*
  433.      have consecutive numbers after renumbering with
  434.      `DBX_REGISTER_NUMBER'.  Otherwise, debuggers will be unable to
  435.      access such a pair, because they expect register pairs to be
  436.      consecutive in their own numbering scheme.
  437.  
  438.      If you find yourself defining `DBX_REGISTER_NUMBER' in way that
  439.      does not preserve register pairs, then what you must do instead is
  440.      redefine the actual register numbering scheme.
  441.  
  442. `DEBUGGER_AUTO_OFFSET (X)'
  443.      A C expression that returns the integer offset value for an
  444.      automatic variable having address X (an RTL expression).  The
  445.      default computation assumes that X is based on the frame-pointer
  446.      and gives the offset from the frame-pointer.  This is required for
  447.      targets that produce debugging output for DBX or COFF-style
  448.      debugging output for SDB and allow the frame-pointer to be
  449.      eliminated when the `-g' options is used.
  450.  
  451. `DEBUGGER_ARG_OFFSET (OFFSET, X)'
  452.      A C expression that returns the integer offset value for an
  453.      argument having address X (an RTL expression).  The nominal offset
  454.      is OFFSET.
  455.  
  456. `PREFERRED_DEBUGGING_TYPE'
  457.      A C expression that returns the type of debugging output GNU CC
  458.      should produce when the user specifies just `-g'.  Define this if
  459.      you have arranged for GNU CC to support more than one format of
  460.      debugging output.  Currently, the allowable values are `DBX_DEBUG',
  461.      `SDB_DEBUG', `DWARF_DEBUG', `DWARF2_DEBUG', and `XCOFF_DEBUG'.
  462.  
  463.      When the user specifies `-ggdb', GNU CC normally also uses the
  464.      value of this macro to select the debugging output format, but
  465.      with two exceptions.  If `DWARF2_DEBUGGING_INFO' is defined and
  466.      `LINKER_DOES_NOT_WORK_WITH_DWARF2' is not defined, GNU CC uses the
  467.      value `DWARF2_DEBUG'.  Otherwise, if `DBX_DEBUGGING_INFO' is
  468.      defined, GNU CC uses `DBX_DEBUG'.
  469.  
  470.      The value of this macro only affects the default debugging output;
  471.      the user can always get a specific type of output by using
  472.      `-gstabs', `-gcoff', `-gdwarf-1', `-gdwarf-2', or `-gxcoff'.
  473.  
  474. 
  475. File: gcc.info,  Node: DBX Options,  Next: DBX Hooks,  Prev: All Debuggers,  Up: Debugging Info
  476.  
  477. Specific Options for DBX Output
  478. -------------------------------
  479.  
  480.    These are specific options for DBX output.
  481.  
  482. `DBX_DEBUGGING_INFO'
  483.      Define this macro if GNU CC should produce debugging output for DBX
  484.      in response to the `-g' option.
  485.  
  486. `XCOFF_DEBUGGING_INFO'
  487.      Define this macro if GNU CC should produce XCOFF format debugging
  488.      output in response to the `-g' option.  This is a variant of DBX
  489.      format.
  490.  
  491. `DEFAULT_GDB_EXTENSIONS'
  492.      Define this macro to control whether GNU CC should by default
  493.      generate GDB's extended version of DBX debugging information
  494.      (assuming DBX-format debugging information is enabled at all).  If
  495.      you don't define the macro, the default is 1: always generate the
  496.      extended information if there is any occasion to.
  497.  
  498. `DEBUG_SYMS_TEXT'
  499.      Define this macro if all `.stabs' commands should be output while
  500.      in the text section.
  501.  
  502. `ASM_STABS_OP'
  503.      A C string constant naming the assembler pseudo op to use instead
  504.      of `.stabs' to define an ordinary debugging symbol.  If you don't
  505.      define this macro, `.stabs' is used.  This macro applies only to
  506.      DBX debugging information format.
  507.  
  508. `ASM_STABD_OP'
  509.      A C string constant naming the assembler pseudo op to use instead
  510.      of `.stabd' to define a debugging symbol whose value is the current
  511.      location.  If you don't define this macro, `.stabd' is used.  This
  512.      macro applies only to DBX debugging information format.
  513.  
  514. `ASM_STABN_OP'
  515.      A C string constant naming the assembler pseudo op to use instead
  516.      of `.stabn' to define a debugging symbol with no name.  If you
  517.      don't define this macro, `.stabn' is used.  This macro applies
  518.      only to DBX debugging information format.
  519.  
  520. `DBX_NO_XREFS'
  521.      Define this macro if DBX on your system does not support the
  522.      construct `xsTAGNAME'.  On some systems, this construct is used to
  523.      describe a forward reference to a structure named TAGNAME.  On
  524.      other systems, this construct is not supported at all.
  525.  
  526. `DBX_CONTIN_LENGTH'
  527.      A symbol name in DBX-format debugging information is normally
  528.      continued (split into two separate `.stabs' directives) when it
  529.      exceeds a certain length (by default, 80 characters).  On some
  530.      operating systems, DBX requires this splitting; on others,
  531.      splitting must not be done.  You can inhibit splitting by defining
  532.      this macro with the value zero.  You can override the default
  533.      splitting-length by defining this macro as an expression for the
  534.      length you desire.
  535.  
  536. `DBX_CONTIN_CHAR'
  537.      Normally continuation is indicated by adding a `\' character to
  538.      the end of a `.stabs' string when a continuation follows.  To use
  539.      a different character instead, define this macro as a character
  540.      constant for the character you want to use.  Do not define this
  541.      macro if backslash is correct for your system.
  542.  
  543. `DBX_STATIC_STAB_DATA_SECTION'
  544.      Define this macro if it is necessary to go to the data section
  545.      before outputting the `.stabs' pseudo-op for a non-global static
  546.      variable.
  547.  
  548. `DBX_TYPE_DECL_STABS_CODE'
  549.      The value to use in the "code" field of the `.stabs' directive for
  550.      a typedef.  The default is `N_LSYM'.
  551.  
  552. `DBX_STATIC_CONST_VAR_CODE'
  553.      The value to use in the "code" field of the `.stabs' directive for
  554.      a static variable located in the text section.  DBX format does not
  555.      provide any "right" way to do this.  The default is `N_FUN'.
  556.  
  557. `DBX_REGPARM_STABS_CODE'
  558.      The value to use in the "code" field of the `.stabs' directive for
  559.      a parameter passed in registers.  DBX format does not provide any
  560.      "right" way to do this.  The default is `N_RSYM'.
  561.  
  562. `DBX_REGPARM_STABS_LETTER'
  563.      The letter to use in DBX symbol data to identify a symbol as a
  564.      parameter passed in registers.  DBX format does not customarily
  565.      provide any way to do this.  The default is `'P''.
  566.  
  567. `DBX_MEMPARM_STABS_LETTER'
  568.      The letter to use in DBX symbol data to identify a symbol as a
  569.      stack parameter.  The default is `'p''.
  570.  
  571. `DBX_FUNCTION_FIRST'
  572.      Define this macro if the DBX information for a function and its
  573.      arguments should precede the assembler code for the function.
  574.      Normally, in DBX format, the debugging information entirely
  575.      follows the assembler code.
  576.  
  577. `DBX_LBRAC_FIRST'
  578.      Define this macro if the `N_LBRAC' symbol for a block should
  579.      precede the debugging information for variables and functions
  580.      defined in that block.  Normally, in DBX format, the `N_LBRAC'
  581.      symbol comes first.
  582.  
  583. `DBX_BLOCKS_FUNCTION_RELATIVE'
  584.      Define this macro if the value of a symbol describing the scope of
  585.      a block (`N_LBRAC' or `N_RBRAC') should be relative to the start
  586.      of the enclosing function.  Normally, GNU C uses an absolute
  587.      address.
  588.  
  589. `DBX_USE_BINCL'
  590.      Define this macro if GNU C should generate `N_BINCL' and `N_EINCL'
  591.      stabs for included header files, as on Sun systems.  This macro
  592.      also directs GNU C to output a type number as a pair of a file
  593.      number and a type number within the file.  Normally, GNU C does not
  594.      generate `N_BINCL' or `N_EINCL' stabs, and it outputs a single
  595.      number for a type number.
  596.  
  597. 
  598. File: gcc.info,  Node: DBX Hooks,  Next: File Names and DBX,  Prev: DBX Options,  Up: Debugging Info
  599.  
  600. Open-Ended Hooks for DBX Format
  601. -------------------------------
  602.  
  603.    These are hooks for DBX format.
  604.  
  605. `DBX_OUTPUT_LBRAC (STREAM, NAME)'
  606.      Define this macro to say how to output to STREAM the debugging
  607.      information for the start of a scope level for variable names.  The
  608.      argument NAME is the name of an assembler symbol (for use with
  609.      `assemble_name') whose value is the address where the scope begins.
  610.  
  611. `DBX_OUTPUT_RBRAC (STREAM, NAME)'
  612.      Like `DBX_OUTPUT_LBRAC', but for the end of a scope level.
  613.  
  614. `DBX_OUTPUT_ENUM (STREAM, TYPE)'
  615.      Define this macro if the target machine requires special handling
  616.      to output an enumeration type.  The definition should be a C
  617.      statement (sans semicolon) to output the appropriate information
  618.      to STREAM for the type TYPE.
  619.  
  620. `DBX_OUTPUT_FUNCTION_END (STREAM, FUNCTION)'
  621.      Define this macro if the target machine requires special output at
  622.      the end of the debugging information for a function.  The
  623.      definition should be a C statement (sans semicolon) to output the
  624.      appropriate information to STREAM.  FUNCTION is the
  625.      `FUNCTION_DECL' node for the function.
  626.  
  627. `DBX_OUTPUT_STANDARD_TYPES (SYMS)'
  628.      Define this macro if you need to control the order of output of the
  629.      standard data types at the beginning of compilation.  The argument
  630.      SYMS is a `tree' which is a chain of all the predefined global
  631.      symbols, including names of data types.
  632.  
  633.      Normally, DBX output starts with definitions of the types for
  634.      integers and characters, followed by all the other predefined
  635.      types of the particular language in no particular order.
  636.  
  637.      On some machines, it is necessary to output different particular
  638.      types first.  To do this, define `DBX_OUTPUT_STANDARD_TYPES' to
  639.      output those symbols in the necessary order.  Any predefined types
  640.      that you don't explicitly output will be output afterward in no
  641.      particular order.
  642.  
  643.      Be careful not to define this macro so that it works only for C.
  644.      There are no global variables to access most of the built-in
  645.      types, because another language may have another set of types.
  646.      The way to output a particular type is to look through SYMS to see
  647.      if you can find it.  Here is an example:
  648.  
  649.           {
  650.             tree decl;
  651.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  652.               if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)),
  653.                            "long int"))
  654.                 dbxout_symbol (decl);
  655.             ...
  656.           }
  657.  
  658.      This does nothing if the expected type does not exist.
  659.  
  660.      See the function `init_decl_processing' in `c-decl.c' to find the
  661.      names to use for all the built-in C types.
  662.  
  663.      Here is another way of finding a particular type:
  664.  
  665.           {
  666.             tree decl;
  667.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  668.               if (TREE_CODE (decl) == TYPE_DECL
  669.                   && (TREE_CODE (TREE_TYPE (decl))
  670.                       == INTEGER_CST)
  671.                   && TYPE_PRECISION (TREE_TYPE (decl)) == 16
  672.                   && TYPE_UNSIGNED (TREE_TYPE (decl)))
  673.                 /* This must be `unsigned short'.  */
  674.                 dbxout_symbol (decl);
  675.             ...
  676.           }
  677.  
  678. `NO_DBX_FUNCTION_END'
  679.      Some stabs encapsulation formats (in particular ECOFF), cannot
  680.      handle the `.stabs "",N_FUN,,0,0,Lscope-function-1' gdb dbx
  681.      extention construct.  On those machines, define this macro to turn
  682.      this feature off without disturbing the rest of the gdb extensions.
  683.  
  684. 
  685. File: gcc.info,  Node: File Names and DBX,  Next: SDB and DWARF,  Prev: DBX Hooks,  Up: Debugging Info
  686.  
  687. File Names in DBX Format
  688. ------------------------
  689.  
  690.    This describes file names in DBX format.
  691.  
  692. `DBX_WORKING_DIRECTORY'
  693.      Define this if DBX wants to have the current directory recorded in
  694.      each object file.
  695.  
  696.      Note that the working directory is always recorded if GDB
  697.      extensions are enabled.
  698.  
  699. `DBX_OUTPUT_MAIN_SOURCE_FILENAME (STREAM, NAME)'
  700.      A C statement to output DBX debugging information to the stdio
  701.      stream STREAM which indicates that file NAME is the main source
  702.      file--the file specified as the input file for compilation.  This
  703.      macro is called only once, at the beginning of compilation.
  704.  
  705.      This macro need not be defined if the standard form of output for
  706.      DBX debugging information is appropriate.
  707.  
  708. `DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (STREAM, NAME)'
  709.      A C statement to output DBX debugging information to the stdio
  710.      stream STREAM which indicates that the current directory during
  711.      compilation is named NAME.
  712.  
  713.      This macro need not be defined if the standard form of output for
  714.      DBX debugging information is appropriate.
  715.  
  716. `DBX_OUTPUT_MAIN_SOURCE_FILE_END (STREAM, NAME)'
  717.      A C statement to output DBX debugging information at the end of
  718.      compilation of the main source file NAME.
  719.  
  720.      If you don't define this macro, nothing special is output at the
  721.      end of compilation, which is correct for most machines.
  722.  
  723. `DBX_OUTPUT_SOURCE_FILENAME (STREAM, NAME)'
  724.      A C statement to output DBX debugging information to the stdio
  725.      stream STREAM which indicates that file NAME is the current source
  726.      file.  This output is generated each time input shifts to a
  727.      different source file as a result of `#include', the end of an
  728.      included file, or a `#line' command.
  729.  
  730.      This macro need not be defined if the standard form of output for
  731.      DBX debugging information is appropriate.
  732.  
  733. 
  734. File: gcc.info,  Node: SDB and DWARF,  Prev: File Names and DBX,  Up: Debugging Info
  735.  
  736. Macros for SDB and DWARF Output
  737. -------------------------------
  738.  
  739.    Here are macros for SDB and DWARF output.
  740.  
  741. `SDB_DEBUGGING_INFO'
  742.      Define this macro if GNU CC should produce COFF-style debugging
  743.      output for SDB in response to the `-g' option.
  744.  
  745. `DWARF_DEBUGGING_INFO'
  746.      Define this macro if GNU CC should produce dwarf format debugging
  747.      output in response to the `-g' option.
  748.  
  749. `DWARF2_DEBUGGING_INFO'
  750.      Define this macro if GNU CC should produce dwarf version 2 format
  751.      debugging output in response to the `-g' option.
  752.  
  753.      To support optional call frame debugging information, you must also
  754.      define `INCOMING_RETURN_ADDR_RTX' and either set
  755.      `RTX_FRAME_RELATED_P' on the prologue insns if you use RTL for the
  756.      prologue, or call `dwarf2out_def_cfa' and `dwarf2out_reg_save' as
  757.      appropriate from `FUNCTION_PROLOGUE' if you don't.
  758.  
  759. `DWARF2_FRAME_INFO'
  760.      Define this macro to a nonzero value if GNU CC should always output
  761.      Dwarf 2 frame information.  If `DWARF2_UNWIND_INFO' (*note
  762.      Exception Region Output::. is nonzero, GNU CC will output this
  763.      information not matter how you define `DWARF2_FRAME_INFO'.
  764.  
  765. `LINKER_DOES_NOT_WORK_WITH_DWARF2'
  766.      Define this macro if the linker does not work with Dwarf version 2.
  767.      Normally, if the user specifies only `-ggdb' GNU CC will use Dwarf
  768.      version 2 if available; this macro disables this.  See the
  769.      description of the `PREFERRED_DEBUGGING_TYPE' macro for more
  770.      details.
  771.  
  772. `PUT_SDB_...'
  773.      Define these macros to override the assembler syntax for the
  774.      special SDB assembler directives.  See `sdbout.c' for a list of
  775.      these macros and their arguments.  If the standard syntax is used,
  776.      you need not define them yourself.
  777.  
  778. `SDB_DELIM'
  779.      Some assemblers do not support a semicolon as a delimiter, even
  780.      between SDB assembler directives.  In that case, define this macro
  781.      to be the delimiter to use (usually `\n').  It is not necessary to
  782.      define a new set of `PUT_SDB_OP' macros if this is the only change
  783.      required.
  784.  
  785. `SDB_GENERATE_FAKE'
  786.      Define this macro to override the usual method of constructing a
  787.      dummy name for anonymous structure and union types.  See
  788.      `sdbout.c' for more information.
  789.  
  790. `SDB_ALLOW_UNKNOWN_REFERENCES'
  791.      Define this macro to allow references to unknown structure, union,
  792.      or enumeration tags to be emitted.  Standard COFF does not allow
  793.      handling of unknown references, MIPS ECOFF has support for it.
  794.  
  795. `SDB_ALLOW_FORWARD_REFERENCES'
  796.      Define this macro to allow references to structure, union, or
  797.      enumeration tags that have not yet been seen to be handled.  Some
  798.      assemblers choke if forward tags are used, while some require it.
  799.  
  800. 
  801. File: gcc.info,  Node: Cross-compilation,  Next: Misc,  Prev: Debugging Info,  Up: Target Macros
  802.  
  803. Cross Compilation and Floating Point
  804. ====================================
  805.  
  806.    While all modern machines use 2's complement representation for
  807. integers, there are a variety of representations for floating point
  808. numbers.  This means that in a cross-compiler the representation of
  809. floating point numbers in the compiled program may be different from
  810. that used in the machine doing the compilation.
  811.  
  812.    Because different representation systems may offer different amounts
  813. of range and precision, the cross compiler cannot safely use the host
  814. machine's floating point arithmetic.  Therefore, floating point
  815. constants must be represented in the target machine's format.  This
  816. means that the cross compiler cannot use `atof' to parse a floating
  817. point constant; it must have its own special routine to use instead.
  818. Also, constant folding must emulate the target machine's arithmetic (or
  819. must not be done at all).
  820.  
  821.    The macros in the following table should be defined only if you are
  822. cross compiling between different floating point formats.
  823.  
  824.    Otherwise, don't define them.  Then default definitions will be set
  825. up which use `double' as the data type, `==' to test for equality, etc.
  826.  
  827.    You don't need to worry about how many times you use an operand of
  828. any of these macros.  The compiler never uses operands which have side
  829. effects.
  830.  
  831. `REAL_VALUE_TYPE'
  832.      A macro for the C data type to be used to hold a floating point
  833.      value in the target machine's format.  Typically this would be a
  834.      `struct' containing an array of `int'.
  835.  
  836. `REAL_VALUES_EQUAL (X, Y)'
  837.      A macro for a C expression which compares for equality the two
  838.      values, X and Y, both of type `REAL_VALUE_TYPE'.
  839.  
  840. `REAL_VALUES_LESS (X, Y)'
  841.      A macro for a C expression which tests whether X is less than Y,
  842.      both values being of type `REAL_VALUE_TYPE' and interpreted as
  843.      floating point numbers in the target machine's representation.
  844.  
  845. `REAL_VALUE_LDEXP (X, SCALE)'
  846.      A macro for a C expression which performs the standard library
  847.      function `ldexp', but using the target machine's floating point
  848.      representation.  Both X and the value of the expression have type
  849.      `REAL_VALUE_TYPE'.  The second argument, SCALE, is an integer.
  850.  
  851. `REAL_VALUE_FIX (X)'
  852.      A macro whose definition is a C expression to convert the
  853.      target-machine floating point value X to a signed integer.  X has
  854.      type `REAL_VALUE_TYPE'.
  855.  
  856. `REAL_VALUE_UNSIGNED_FIX (X)'
  857.      A macro whose definition is a C expression to convert the
  858.      target-machine floating point value X to an unsigned integer.  X
  859.      has type `REAL_VALUE_TYPE'.
  860.  
  861. `REAL_VALUE_RNDZINT (X)'
  862.      A macro whose definition is a C expression to round the
  863.      target-machine floating point value X towards zero to an integer
  864.      value (but still as a floating point number).  X has type
  865.      `REAL_VALUE_TYPE', and so does the value.
  866.  
  867. `REAL_VALUE_UNSIGNED_RNDZINT (X)'
  868.      A macro whose definition is a C expression to round the
  869.      target-machine floating point value X towards zero to an unsigned
  870.      integer value (but still represented as a floating point number).
  871.      X has type `REAL_VALUE_TYPE', and so does the value.
  872.  
  873. `REAL_VALUE_ATOF (STRING, MODE)'
  874.      A macro for a C expression which converts STRING, an expression of
  875.      type `char *', into a floating point number in the target machine's
  876.      representation for mode MODE.  The value has type
  877.      `REAL_VALUE_TYPE'.
  878.  
  879. `REAL_INFINITY'
  880.      Define this macro if infinity is a possible floating point value,
  881.      and therefore division by 0 is legitimate.
  882.  
  883. `REAL_VALUE_ISINF (X)'
  884.      A macro for a C expression which determines whether X, a floating
  885.      point value, is infinity.  The value has type `int'.  By default,
  886.      this is defined to call `isinf'.
  887.  
  888. `REAL_VALUE_ISNAN (X)'
  889.      A macro for a C expression which determines whether X, a floating
  890.      point value, is a "nan" (not-a-number).  The value has type `int'.
  891.      By default, this is defined to call `isnan'.
  892.  
  893.    Define the following additional macros if you want to make floating
  894. point constant folding work while cross compiling.  If you don't define
  895. them, cross compilation is still possible, but constant folding will
  896. not happen for floating point values.
  897.  
  898. `REAL_ARITHMETIC (OUTPUT, CODE, X, Y)'
  899.      A macro for a C statement which calculates an arithmetic operation
  900.      of the two floating point values X and Y, both of type
  901.      `REAL_VALUE_TYPE' in the target machine's representation, to
  902.      produce a result of the same type and representation which is
  903.      stored in OUTPUT (which will be a variable).
  904.  
  905.      The operation to be performed is specified by CODE, a tree code
  906.      which will always be one of the following: `PLUS_EXPR',
  907.      `MINUS_EXPR', `MULT_EXPR', `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'.
  908.  
  909.      The expansion of this macro is responsible for checking for
  910.      overflow.  If overflow happens, the macro expansion should execute
  911.      the statement `return 0;', which indicates the inability to
  912.      perform the arithmetic operation requested.
  913.  
  914. `REAL_VALUE_NEGATE (X)'
  915.      A macro for a C expression which returns the negative of the
  916.      floating point value X.  Both X and the value of the expression
  917.      have type `REAL_VALUE_TYPE' and are in the target machine's
  918.      floating point representation.
  919.  
  920.      There is no way for this macro to report overflow, since overflow
  921.      can't happen in the negation operation.
  922.  
  923. `REAL_VALUE_TRUNCATE (MODE, X)'
  924.      A macro for a C expression which converts the floating point value
  925.      X to mode MODE.
  926.  
  927.      Both X and the value of the expression are in the target machine's
  928.      floating point representation and have type `REAL_VALUE_TYPE'.
  929.      However, the value should have an appropriate bit pattern to be
  930.      output properly as a floating constant whose precision accords
  931.      with mode MODE.
  932.  
  933.      There is no way for this macro to report overflow.
  934.  
  935. `REAL_VALUE_TO_INT (LOW, HIGH, X)'
  936.      A macro for a C expression which converts a floating point value X
  937.      into a double-precision integer which is then stored into LOW and
  938.      HIGH, two variables of type INT.
  939.  
  940. `REAL_VALUE_FROM_INT (X, LOW, HIGH, MODE)'
  941.      A macro for a C expression which converts a double-precision
  942.      integer found in LOW and HIGH, two variables of type INT, into a
  943.      floating point value which is then stored into X.  The value is in
  944.      the target machine's representation for mode MODE and has the type
  945.      `REAL_VALUE_TYPE'.
  946.  
  947.